package com.li.hsanguosha.service.Impl;

import com.li.hsanguosha.mapper.UserMapper;
import com.li.hsanguosha.pojo.User;
import com.li.hsanguosha.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public void register(String username, String password, String nickname) {
        userMapper.register(username, password, nickname);
    }

    @Override
    public void login(String username, String password) {
        userMapper.login(username,password);
    }

    @Override
    public User findUserByName(String username) {
        return userMapper.getUserByName(username);
    }
}
